package com.yonyou.pmclouds.siteinspection.mapper;

import com.yonyou.pmclouds.basecom.cache.RedisCache;
import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.siteinspection.entity.SiteInspectionListViewVO;
import com.yonyou.pmclouds.siteinspection.entity.SiteInspectionVO;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

@CacheNamespace(implementation = RedisCache.class)
public interface SiteInspectionMapper extends BaseMapper<SiteInspectionVO>{
    
    SiteInspectionVO[] selectByPkProject(String pk_project);

    SiteInspectionListViewVO[] selectLists(String pk_project);

    SiteInspectionListViewVO[] queryByBillTypeProject(@Param("pkProject") String pkProject, @Param("billType") String billType);

    String[] queryIdsByBillTypeProject(@Param("pkProject") String pkProject, @Param("billType") String billType);

    SiteInspectionListViewVO[] getByIds(@Param("ids") String[] ids);

    Integer selectRefByCode(@Param("code")String code,@Param("ids") String[] ids);

    SiteInspectionVO[] queryByCondition(@Param("pkProjects")String[] pkProjects,
                                        @Param("billType") String billType,
                                        @Param("creators") String[] creators,
                                        @Param("startDate") String startDate,
                                        @Param("endDate") String endDate,
                                        @Param("billStatus") int[] billStatus,
                                        @Param("start") int start,
                                        @Param("size") int size);
    int countByCondition(@Param("pkProjects")String[] pkProjects,
                         @Param("billType")String billType,
                         @Param("creators") String[] creators,
                         @Param("startDate") String startDate,
                         @Param("endDate") String endDate,
                         @Param("billStatus") int[] billStatus);
}
